﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using QualityRpt.Dao;
using QualityRpt.Utils;

namespace QualityRpt.Service
{
    public class DeviceContractDetailService:BaseService
    {
        private static IDeviceContractDetailDao _impDao = null;
        static DeviceContractDetailService()
        {
            _impDao = CreateDaoInstance("IDeviceContractDetailDao") as IDeviceContractDetailDao;
        }
        public static DataTable GetBySpecIn(string specIn,int devID,PageUtils pu)
        {
            return _impDao.GetBySpecIn(specIn,devID,pu);
        }
        public static DataTable GetListBySpIn(int devID,string spIn,PageUtils pu)
        {
            return _impDao.GetListBySpIn(devID,spIn,pu);
        }
        public static DataTable GetListByCnIn(int devID,string cnIn,PageUtils pu)
        {
            return _impDao.GetListByCnIn(devID,cnIn,pu);
        }
        public static DataTable GetSchema()
        {
            DataTable rtTable = _impDao.GetList("ID=0");
            return rtTable.Clone();
        }
        public static DataRow Save(DataRow row)
        {
            return _impDao.Save(row);
        }
        public static DataRow Update(DataRow row)
        {
            return _impDao.Update(row);
        }
        public static DataRow Get(long id)
        {
            return _impDao.Get(id);
        }
        public static void Delete(long id)
        {
            _impDao.Delete(id);
        }
        public static DataTable GetList(string where)
        {
            return _impDao.GetList(where);
        }
        public static DataTable GetList(string where, string sort)
        {
            return _impDao.GetList(where, sort);
        }
        public static DataTable GetTempOBU()
        {
            return _impDao.GetTempOBU();
        }
        public static void SaveTable(string cnno, DataTable table)
        {
            _impDao.SaveTable(cnno, table);
        }
        public static void DeleteByCn(string cnno)
        {
            _impDao.DeleteByCn(cnno);
        }
    }
}
